#!/usr/bin/python
# -*- coding: utf8 -*-
from OpenGL.GL import *
import numpy as np
class Score:

	SCORE = []
	def __init__(self):
		self.SCORE.append(0)
		self.SCORE.append(0)

	def drawPlayerScore(self):
		if self.SCORE[0] is 0:
			glDrawArrays(GL_QUADS,24 , 4)
			glDrawArrays(GL_QUADS,24 + 4, 4)
			glDrawArrays(GL_QUADS,24 + 8, 4)
			glDrawArrays(GL_QUADS,24 + 12 , 4)

		if self.SCORE[0] is 1:
			glDrawArrays(GL_QUADS,24 + 16 , 4)

		if self.SCORE[0] is 2:
			glDrawArrays(GL_QUADS,24 + 20, 4)
			glDrawArrays(GL_QUADS,24 + 24, 4)
			glDrawArrays(GL_QUADS,24 + 28, 4)
			glDrawArrays(GL_QUADS,24 + 32 , 4)
			glDrawArrays(GL_QUADS,24 + 36 , 4)

		if self.SCORE[0] is 3:
			glDrawArrays(GL_QUADS,24 + 40, 4)
			glDrawArrays(GL_QUADS,24 + 44, 4)
			glDrawArrays(GL_QUADS,24 + 48, 4)
			glDrawArrays(GL_QUADS,24 + 52 , 4)

		if self.SCORE[0] is 4:
			glDrawArrays(GL_QUADS,24 + 56 , 4)
			glDrawArrays(GL_QUADS,24 + 60, 4)
			glDrawArrays(GL_QUADS,24 + 64, 4)

		if self.SCORE[0] is 5:
			glDrawArrays(GL_QUADS,24 + 68, 4)
			glDrawArrays(GL_QUADS,24 + 72, 4)
			glDrawArrays(GL_QUADS,24 + 76, 4)
			glDrawArrays(GL_QUADS,24 + 80, 4)
			glDrawArrays(GL_QUADS,24 + 84, 4)
		
		if self.SCORE[1] is 0:
			glDrawArrays(GL_QUADS,24 + 88, 4)
			glDrawArrays(GL_QUADS,24 + 92, 4)
			glDrawArrays(GL_QUADS,24 + 96, 4)
			glDrawArrays(GL_QUADS,24 + 100 , 4)

		if self.SCORE[1] is 1:
			glDrawArrays(GL_QUADS,24 + 104, 4)

		if self.SCORE[1] is 2:
			glDrawArrays(GL_QUADS,24 + 108, 4)
			glDrawArrays(GL_QUADS,24 + 112, 4)
			glDrawArrays(GL_QUADS,24 + 116, 4)
			glDrawArrays(GL_QUADS,24 + 120 , 4)
			glDrawArrays(GL_QUADS,24 + 124 , 4)

		if self.SCORE[1] is 3:
			glDrawArrays(GL_QUADS,24 + 128, 4)
			glDrawArrays(GL_QUADS,24 + 132, 4)
			glDrawArrays(GL_QUADS,24 + 136, 4)
			glDrawArrays(GL_QUADS,24 + 140 , 4)

		if self.SCORE[1] is 4:
			glDrawArrays(GL_QUADS,24 + 144, 4)
			glDrawArrays(GL_QUADS,24 + 148, 4)
			glDrawArrays(GL_QUADS,24 + 152, 4)

		if self.SCORE[1] is 5:
			glDrawArrays(GL_QUADS,24 + 156, 4)
			glDrawArrays(GL_QUADS,24 + 160, 4)
			glDrawArrays(GL_QUADS,24 + 164, 4)
			glDrawArrays(GL_QUADS,24 + 168, 4)
			glDrawArrays(GL_QUADS,24 + 172, 4)
			
	def addScore(self, who):
		if who:
			self.SCORE[0] += 1
		else:
			self.SCORE[1] += 1